<html>
<head><meta charset="utf-8"><title>jsondocck · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html">jsondocck</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="222903813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222903813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222903813">(Jan 15 2021 at 18:36)</a>:</h4>
<p>So, looking around, there already exists both a JSONPath idea, and an implementation of it in Python:<br>
<a href="https://goessner.net/articles/JsonPath/">https://goessner.net/articles/JsonPath/</a><br>
<a href="https://pypi.org/project/jsonpath-ng/">https://pypi.org/project/jsonpath-ng/</a></p>
<p>The licensing is Apache 2.0, I'm not sure what the rules are for pip dependencies / if the source would need to be copied in somewhere, but it would allow parsing JSON output with the same kind of directives as HTML has, and in a way where index only matters if we want it to</p>



<a name="222905381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222905381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222905381">(Jan 15 2021 at 18:47)</a>:</h4>
<p>I don't know the rules for dependencies either. I don't see any requirements.txt files which may mean no one has tried to do this before.</p>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> how do you feel about adding a python dependency to <code>src/test/rustdoc-json</code>?</p>



<a name="222905878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222905878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222905878">(Jan 15 2021 at 18:50)</a>:</h4>
<p>I don't know anything about that folder, but I feel pretty unhappy I think. Python is an easier sell than node, because it's already required for LLVM and x.py, but both of those just need the standard installation.</p>
<p>I'm pretty sure I've seen rust crates providing a jq-like interface, though. Maybe we can use those?</p>



<a name="222906044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906044">(Jan 15 2021 at 18:51)</a>:</h4>
<p>sounds good to me :) <span class="user-mention" data-user-id="319144">@Rune Tynan</span> do you mind looking for ways to do this in rust instead?</p>



<a name="222906047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906047">(Jan 15 2021 at 18:51)</a>:</h4>
<p>I would also ask - do we really need this for testing? It might be worth talking to <span class="user-mention" data-user-id="133169">@matklad</span> about what rust-analyzer does - I imagine there's a similar need there.</p>



<a name="222906087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906087">(Jan 15 2021 at 18:51)</a>:</h4>
<p>the current testing situation is <em>really</em> painful</p>



<a name="222906175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906175">(Jan 15 2021 at 18:52)</a>:</h4>
<p>it took me and <span class="user-mention silent" data-user-id="319144">Rune Tynan</span> several hours to debug a recent failure: <a href="#narrow/stream/266220-rustdoc/topic/Removing.20doctree.20stuff/near/222780199">https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Removing.20doctree.20stuff/near/222780199</a></p>



<a name="222906223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906223">(Jan 15 2021 at 18:52)</a>:</h4>
<p>and I would like to get away from contains.py if at all possible, I don't think it's really testing the right thing anyway</p>



<a name="222906258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906258">(Jan 15 2021 at 18:53)</a>:</h4>
<p>It looks like there is a jsonpath Rust crate, but also that it's fairly young/limited, I'll see if it's enough for what we want</p>



<a name="222906642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906642">(Jan 15 2021 at 18:55)</a>:</h4>
<p>hmm, that was last released 2 years ago which makes me a little nervous</p>



<a name="222906675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906675">(Jan 15 2021 at 18:55)</a>:</h4>
<p><a href="https://github.com/freestrings/jsonpath">https://github.com/freestrings/jsonpath</a> looks better maintained</p>



<a name="222906972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222906972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222906972">(Jan 15 2021 at 18:57)</a>:</h4>
<p>Yep, that's what I was just looking at</p>



<a name="222907057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907057">(Jan 15 2021 at 18:58)</a>:</h4>
<p>ah ok, I was looking at <a href="https://docs.rs/jsonpath/0.1.1/jsonpath/">https://docs.rs/jsonpath/0.1.1/jsonpath/</a> originally</p>



<a name="222907108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907108">(Jan 15 2021 at 18:58)</a>:</h4>
<p>Oh, I was looking at that originally too. I had the same 'Hm, 2 years makes me nervous', one of the issues linked to a comparison page, that linked to the freestrings one</p>



<a name="222907284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907284">(Jan 15 2021 at 18:59)</a>:</h4>
<p>So now I was looking at the freestrings one, and it looks both recently maintained, and to have much better feature support. It appears to accept either a serde Value or a string, so we have options too :P</p>



<a name="222907390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907390">(Jan 15 2021 at 19:00)</a>:</h4>
<p>nice, that sounds good to me</p>



<a name="222907461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907461">(Jan 15 2021 at 19:00)</a>:</h4>
<p>(weird that they chose <code>jsonpath_lib</code> as the crate name, but doesn't matter a lot)</p>



<a name="222907779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907779">(Jan 15 2021 at 19:02)</a>:</h4>
<p>To be clear, I'd be totally fine with rolling our own small thing, too - I imagine rustdoc's needs may be somewhat unique.</p>



<a name="222907841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907841">(Jan 15 2021 at 19:02)</a>:</h4>
<p>rolling our own would be a lot more work than using the library I expect</p>



<a name="222907880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907880">(Jan 15 2021 at 19:02)</a>:</h4>
<p>this is less "be a test suite" and more "I need an XPATH library" (but for JSON)</p>



<a name="222907890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907890">(Jan 15 2021 at 19:02)</a>:</h4>
<p>Yeah, if there's something, definitely let's use it.</p>



<a name="222907920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222907920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222907920">(Jan 15 2021 at 19:03)</a>:</h4>
<p><code>jsonpath</code> was released first, so I imagine <code>jsonpath_lib</code> because the other was taken</p>



<a name="222908047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908047">(Jan 15 2021 at 19:03)</a>:</h4>
<p>FWIW I think asking people running this test suite to install jq (cli library providing this) would be fine</p>



<a name="222908229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908229">(Jan 15 2021 at 19:04)</a>:</h4>
<p>It also looks like there's several wrappers for libjq out there which may be even better</p>



<a name="222908273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908273">(Jan 15 2021 at 19:05)</a>:</h4>
<p>libjq is a C library? that sounds more painful than either 'install jq' or a rust dependency</p>



<a name="222908349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908349">(Jan 15 2021 at 19:05)</a>:</h4>
<p>Well, I mean rust wrappers</p>



<a name="222908387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908387">(Jan 15 2021 at 19:05)</a>:</h4>
<p>So they probably just compile it internally</p>



<a name="222908453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908453">(Jan 15 2021 at 19:06)</a>:</h4>
<p>sure - I think we'll only need a small subset of jq's features though</p>



<a name="222908466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908466">(Jan 15 2021 at 19:06)</a>:</h4>
<p>But the CLI tool should be fine for us</p>



<a name="222908497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908497">(Jan 15 2021 at 19:06)</a>:</h4>
<p>jq is a whole programming language really lol</p>



<a name="222908584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908584">(Jan 15 2021 at 19:07)</a>:</h4>
<p><a href="https://github.com/dflemstr/rq">https://github.com/dflemstr/rq</a></p>



<a name="222908621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908621">(Jan 15 2021 at 19:07)</a>:</h4>
<p>I think we have enough tools <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> but I appreciate the help</p>



<a name="222908634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908634">(Jan 15 2021 at 19:07)</a>:</h4>
<p>That feels like the thing to use</p>



<a name="222908717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908717">(Jan 15 2021 at 19:08)</a>:</h4>
<p>I think jsonpath works fine for our use cases, and has slightly less 'overhead' to it, but I'm fine either way. jq has at least as many features, I just went with the first option that fit the need :P</p>



<a name="222908803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908803">(Jan 15 2021 at 19:08)</a>:</h4>
<p>let's go with jsonpath for now</p>



<a name="222908817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908817">(Jan 15 2021 at 19:08)</a>:</h4>
<p>it uses the same syntax as jq, right?</p>



<a name="222908829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908829">(Jan 15 2021 at 19:08)</a>:</h4>
<p>that would make it pretty easy to switch later if we need to</p>



<a name="222908858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222908858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222908858">(Jan 15 2021 at 19:09)</a>:</h4>
<p>Not quite the same, but similar. The jq wiki has a page on conversion, it looks easy to do</p>



<a name="222909865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222909865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222909865">(Jan 15 2021 at 19:14)</a>:</h4>
<p>Alright, so the actual test is invoked by compiletest. Would I add stuff there, or somewhere else?</p>



<a name="222909977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222909977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222909977">(Jan 15 2021 at 19:15)</a>:</h4>
<p>compiletest is just running <code>compare.py</code>, right? I would look how this works for <code>tidy</code>, which is also written in rust</p>



<a name="222910058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222910058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222910058">(Jan 15 2021 at 19:16)</a>:</h4>
<p>the idea is you want rustbuild to compile the checker before calling compiletest</p>



<a name="222914560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222914560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222914560">(Jan 15 2021 at 19:47)</a>:</h4>
<p>I'm playing the 'add things and see what breaks' method of learning what needs to change to make this work :P</p>



<a name="222914602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222914602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222914602">(Jan 15 2021 at 19:47)</a>:</h4>
<p>me every time I try to change bootstrap lol</p>



<a name="222916314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222916314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222916314">(Jan 15 2021 at 19:59)</a>:</h4>
<p>One issue is that there are currently two tests with a whole bunch of expected JSON, but the smart thing would be many smaller tests that assert specific parts of it. EG</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">PlainEmpty</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Tuple</span><span class="p">(</span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="nb">String</span><span class="p">);</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Unit</span><span class="p">;</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">WithPrimitives</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">num</span>: <span class="kt">u32</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">s</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="kt">str</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">WithGenerics</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">stuff</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">things</span>: <span class="nc">HashMap</span><span class="o">&lt;</span><span class="n">U</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>This should be at least one file per struct, as the implication (No comments + short name = I have to guess the intent) is that it's just ensuring the structs document correctly.</p>



<a name="222916489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222916489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222916489">(Jan 15 2021 at 20:00)</a>:</h4>
<p>sounds good to me - I think @pineapple wrote up his reasoning on the original PR if I can find it</p>



<a name="222916549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222916549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222916549">(Jan 15 2021 at 20:00)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/75114#discussion_r469426829">https://github.com/rust-lang/rust/pull/75114#discussion_r469426829</a></p>



<a name="222917224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222917224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222917224">(Jan 15 2021 at 20:04)</a>:</h4>
<p>Awesome, thank you</p>



<a name="222920180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222920180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222920180">(Jan 15 2021 at 20:24)</a>:</h4>
<p><del>The sudden temptation to merge htmldocck into this tool, to reduce duplication of rewriting parts of it in Rust</del></p>



<a name="222921108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222921108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222921108">(Jan 15 2021 at 20:31)</a>:</h4>
<div class="codehilite"><pre><span></span><code>thread &#39;main&#39; panicked at &#39;not yet implemented&#39;, src\tools\jsondocck\src\main.rs
</code></pre></div>
<p>Yay! Now to actually implement the commands</p>



<a name="222921246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222921246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222921246">(Jan 15 2021 at 20:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="319144">Rune Tynan</span> <a href="#narrow/stream/266220-rustdoc/topic/jsondocck/near/222920180">said</a>:</p>
<blockquote>
<p><del>The sudden temptation to merge htmldocck into this tool, to reduce duplication of rewriting parts of it in Rust</del></p>
</blockquote>
<p>FWIW once this is working I would be ok with extending it to replace htmldocck</p>



<a name="222921327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222921327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222921327">(Jan 15 2021 at 20:32)</a>:</h4>
<p>that seems low-priority though, htmldocck is pretty reliable</p>



<a name="222922094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222922094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222922094">(Jan 15 2021 at 20:39)</a>:</h4>
<p>Yeah, the only reason I said that is just that this basically has the exact same get_commands code, inputs, etc. So it hit the DRY part of my brain. But it's not what I'm focused on right now, I'd rather just get the json part done, then change it in the future.</p>



<a name="222923135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222923135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222923135">(Jan 15 2021 at 20:48)</a>:</h4>
<p>Question: Is using unstable features allowed? I ask solely for Option::contains, so I'm fine if the answer is no, I'll just handle it inline / make a helper</p>



<a name="222923273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222923273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222923273">(Jan 15 2021 at 20:49)</a>:</h4>
<p><span class="user-mention" data-user-id="319144">@Rune Tynan</span> preferably not, bootstrap tools are compiled with beta and I'd like not to add more RUSTC_BOOTSTRAP special casing</p>



<a name="222923620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222923620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222923620">(Jan 15 2021 at 20:52)</a>:</h4>
<p>see also <a href="https://github.com/rust-lang/rust/pull/76423">https://github.com/rust-lang/rust/pull/76423</a></p>



<a name="222924593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222924593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222924593">(Jan 15 2021 at 21:00)</a>:</h4>
<p>Makes sense. I'll just use it inline, or make a helper if it looks cleaner that way.</p>



<a name="222928918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222928918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222928918">(Jan 15 2021 at 21:37)</a>:</h4>
<p>The python version of the regex uses lookbehind, which the regex crate doesn't support. It looks like it is basically equivalent to just including a single whitespace before the rest of the regex, so I'm doing that</p>



<a name="222929064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222929064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222929064">(Jan 15 2021 at 21:39)</a>:</h4>
<p>How do I force the test to re-run, don't ignore unchanged tests?</p>



<a name="222929079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222929079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222929079">(Jan 15 2021 at 21:39)</a>:</h4>
<p><code>touch test.rs</code> should work</p>



<a name="222929091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222929091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222929091">(Jan 15 2021 at 21:39)</a>:</h4>
<p>there may be a flag but touch is usually easier</p>



<a name="222930435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222930435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222930435">(Jan 15 2021 at 21:52)</a>:</h4>
<div class="codehilite"><pre><span></span><code>[
Command { negated: false, cmd: Has, args: [&quot;nested.json&quot;, &quot;$.[0:3]&quot;], lineno: 4 },
Command { negated: false, cmd: Has, args: [&quot;nested.json&quot;, &quot;$.[0:7].inner.glob&quot;, &quot;false&quot;], lineno: 7 }
]
</code></pre></div>
<p>We're getting there</p>



<a name="222939468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939468">(Jan 15 2021 at 23:14)</a>:</h4>
<p><a href="/user_uploads/4715/gGrW9Lz5hj0h3HfRoQzXrU7R/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/gGrW9Lz5hj0h3HfRoQzXrU7R/image.png" title="image.png"><img src="/user_uploads/4715/gGrW9Lz5hj0h3HfRoQzXrU7R/image.png"></a></div>



<a name="222939494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939494">(Jan 15 2021 at 23:14)</a>:</h4>
<p>This is running the new jsondocck, not the old compare, with two directives added, and it fails if I swap their polarity or such!</p>



<a name="222939530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939530">(Jan 15 2021 at 23:14)</a>:</h4>
<p>that's awesome! :D</p>



<a name="222939545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939545">(Jan 15 2021 at 23:15)</a>:</h4>
<p>thank you so much for working on this <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="222939648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939648">(Jan 15 2021 at 23:16)</a>:</h4>
<p>No problem! Its been fun to work on.</p>



<a name="222939732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939732">(Jan 15 2021 at 23:17)</a>:</h4>
<p>What's left:<br>
'count' command, maybe something like 'matches', and code cleanup</p>



<a name="222939839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939839">(Jan 15 2021 at 23:18)</a>:</h4>
<p>The whole <code>0:3</code> system of identifiers is gonna be interesting, that's hard to not hardcode and if I understand DefId's right, will change any time an item is added</p>



<a name="222939850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939850">(Jan 15 2021 at 23:18)</a>:</h4>
<p>yes, DefIds are not at all stable unfortunately</p>



<a name="222939977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222939977">(Jan 15 2021 at 23:19)</a>:</h4>
<p>That's more a JSON format thing, if I remember the RFC those identifiers are explicitly allowed to change at rustdoc's discretion, so maybe there's a better alternative in the future. But that's outside the scope of just better testing :P</p>



<a name="222940056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222940056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222940056">(Jan 15 2021 at 23:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="319144">Rune Tynan</span> <a href="#narrow/stream/266220-rustdoc/topic/jsondocck/near/222939977">said</a>:</p>
<blockquote>
<p>That's more a JSON format thing, if I remember the RFC those identifiers are explicitly allowed to change at rustdoc's discretion, so maybe there's a better alternative in the future. But that's outside the scope of just better testing :P</p>
</blockquote>
<p>if you're interested in this, take a look at <a href="https://github.com/rust-lang/rust/issues/80664#issuecomment-753681341">https://github.com/rust-lang/rust/issues/80664#issuecomment-753681341</a></p>



<a name="222941908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222941908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222941908">(Jan 15 2021 at 23:44)</a>:</h4>
<p><a href="/user_uploads/4715/T_hR8h2VF7hw0pnHttlQaq5F/image.png">image.png</a> <br>
Thoughts on this output format? (with line numbers / context)</p>
<div class="message_inline_image"><a href="/user_uploads/4715/T_hR8h2VF7hw0pnHttlQaq5F/image.png" title="image.png"><img src="/user_uploads/4715/T_hR8h2VF7hw0pnHttlQaq5F/image.png"></a></div>



<a name="222941995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222941995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222941995">(Jan 15 2021 at 23:46)</a>:</h4>
<p>seems fine - the context is the most important IMO</p>



<a name="222942049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222942049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222942049">(Jan 15 2021 at 23:46)</a>:</h4>
<p>it would be really nice if it could say <em>where</em> it failed</p>



<a name="222942063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222942063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222942063">(Jan 15 2021 at 23:46)</a>:</h4>
<p>like for <code>.x.y.z</code> say 'y' isn't found instead of '.x.y.z did not match'</p>



<a name="222942354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222942354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222942354">(Jan 15 2021 at 23:50)</a>:</h4>
<p>I'll see if the jsonpath lib gives me that info, if so it should be easy enough to add. If not I'll consider, may make the sad-path slow but informative by making it 'peel back' each subpath and try again?</p>



<a name="222942660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222942660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222942660">(Jan 15 2021 at 23:55)</a>:</h4>
<p>sounds great! yeah, that's how intra-doc links does error reporting</p>



<a name="222943849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222943849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222943849">(Jan 16 2021 at 00:11)</a>:</h4>
<p>Oh, also, would you know why I keep getting a panic 'need path to cargo' from tidy when I run tests? The test suite keeps going, but it fills up output</p>



<a name="222944127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222944127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222944127">(Jan 16 2021 at 00:15)</a>:</h4>
<p>Looking around, I think the <code>has_tidy</code> check in compiletest is doing it. It silences stdout but not stderr</p>



<a name="222949041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222949041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222949041">(Jan 16 2021 at 01:25)</a>:</h4>
<p>Working on splitting up the tests better now</p>



<a name="222949931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222949931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222949931">(Jan 16 2021 at 01:39)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/81063">https://github.com/rust-lang/rust/pull/81063</a></p>



<a name="222949954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222949954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222949954">(Jan 16 2021 at 01:39)</a>:</h4>
<p>Ready for the first round of reviews <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="222994555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/222994555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#222994555">(Jan 16 2021 at 17:36)</a>:</h4>
<p>left another review, it's on the right track :)</p>



<a name="223007821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/jsondocck/near/223007821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> CraftSpider <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/jsondocck.html#223007821">(Jan 16 2021 at 21:37)</a>:</h4>
<p>I've gone through and left comments/reasoning on a couple</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>